![]() |
PATH![]() |
![]() ![]() |
Obtains the height of a menu bar.
pascal OSStatus GetThemeMenuBarHeight (SInt16 *outHeight);
The GetThemeMenuBarHeight function obtains the specified height of a menu bar in the current theme. This is in contrast to the Menu Manager function GetMBarHeight , which obtains the actual space that the menu bar is currently occupying on the screen. In most instances, the values produced by these two functions are the same. But, when the menu bar is hidden, GetMBarHeight produces a value of 0, and GetThemeMenuBarHeight still provides the "ideal" menu bar height.
Because menu bar heights may vary among appearances by one or more pixels, you should check the current menu bar height after a theme switch. Specifically, your application should respond to the theme-switch Apple event, kAEAppearanceChanged , by checking the current menu bar height. See Appearance Manager Apple Event Constants for more details on kAEAppearanceChanged .
It is important to check the menu bar height before positioning any windows. Failure to do so may result in the menu bar overlapping your application's windows.